package org.jeecg.modules.rental.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @Description: rental_order
 * @Author: jeecg-boot
 * @Date:   2024-06-17
 * @Version: V1.0
 */
@Data
@TableName("rental_order")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="rental_order对象", description="租赁订单")
public class RentalOrder implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
	/**用户id*/
	@Excel(name = "用户id", width = 15)
    @ApiModelProperty(value = "用户id")
    private String accountId;
	/**车辆类型*/
	@Excel(name = "车辆类型", width = 15)
    @ApiModelProperty(value = "车辆类型")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long carTypeId;
    @Excel(name = "网点 ID", width = 15)
    @ApiModelProperty(value = "网点 ID")
    private  Long meshPointId;

    @TableField(exist = false)
    private String carImage;

	/**车辆id*/
	@Excel(name = "车辆id", width = 15)
    @ApiModelProperty(value = "车辆id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long carId;
	/**套餐id*/
	@Excel(name = "套餐id", width = 15)
    @ApiModelProperty(value = "套餐id")
    private Long packageConfId;
    /**套餐类型名称**/
    @TableField(exist = false)
    private String packageConfName;
    /**套餐类型计算单位**/
    @TableField(exist = false)
    private String packageTypeUnit;
	/**用户优惠券id*/
	@Excel(name = "用户优惠券id", width = 15)
    @ApiModelProperty(value = "用户优惠券id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long accountCouponId;
	/**用户套餐id*/
	@Excel(name = "用户套餐id", width = 15)
    @ApiModelProperty(value = "用户套餐id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long accountPackageId;
	/**订单类型 1-租赁支付 2-续租支付 3-超时支付*/
	@Excel(name = "订单类型 1-租赁支付 2-续租支付 3-超时支付", width = 15)
    @ApiModelProperty(value = "订单类型 1-租赁支付 2-续租支付 3-超时支付  4:预约")
    private Integer orderType;
	/**订单编码*/
	@Excel(name = "订单编码", width = 15)
    @ApiModelProperty(value = "订单编码")
    private String orderCode;

//    @Excel(name = "工行订单号", width = 15)
//    @ApiModelProperty(value = "工行订单号")
//    private String icbcOrderId;

	/**订单状态 1-未支付 2-已支付 3-已取消*/
	@Excel(name = "订单状态 1-未支付 2-已支付 3-已取消", width = 15)
    @ApiModelProperty(value = "订单状态 1-未支付 2-已支付 3-已取消")
    private Integer orderStatus;
	/**订单金额*/
	@Excel(name = "订单金额", width = 15)
    @ApiModelProperty(value = "订单金额")
    private BigDecimal orderAmount;
    /**订单金额*/
    @Excel(name = "押金金额", width = 15)
    @ApiModelProperty(value = "押金金额")
    private BigDecimal depositAmount;
	/**优惠金额*/
	@Excel(name = "优惠金额", width = 15)
    @ApiModelProperty(value = "优惠金额")
    private BigDecimal discountAmount;
	/**实付金额*/
	@Excel(name = "实付金额", width = 15)
    @ApiModelProperty(value = "实付金额")
    private BigDecimal payAmount;
	/**支付时间*/
	@Excel(name = "支付时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "支付时间")
    private LocalDateTime payTime;
	/**购买计数（多少小时/天/月）*/
//	@Excel(name = "购买计数（多少小时/天/月）", width = 15)
//    @ApiModelProperty(value = "购买计数（多少小时/天/月）")
//    private BigDecimal count;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
//    @Excel(name = "支付方式 1-微信支付 2聚合支付", width = 15)
//    @ApiModelProperty(value = "支付方式 1-微信支付 2聚合支付")
//    private Integer payType;

    @Excel(name = "预约使用时间", width = 15)
    @ApiModelProperty(value = "预约使用时间")
    private LocalDateTime useTime;

    @TableField(exist = false)
    private String identityName;

    /**是否删除（0：否、1：是）*/
    @Excel(name = "是否删除（0：否、1：是）", width = 15)
    @ApiModelProperty(value = "是否删除（0：否、1：是）")
    @TableLogic(value="0", delval = "1")
    private String isDelete;

    /*@Excel(name = "套餐类别 1-普通套餐 2-畅享套餐", width = 15)
    @ApiModelProperty(value = "套餐类别 1-普通套餐 2-畅享套餐")
    private  String pkgCategory;*/
}
